package com.disdr.datacenter;

import com.disdr.bean.驼峰式命名法;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

public class 抖店商品维度订单 {

    public static void main(String[] args) throws IOException {

        String sssss = "getShopOrderNum;getOrderId;getShopNum;getShopName;getItemNum;getSumAmount;getPayTypeDesc;getProductName;getGoodsNum;getCode;getCreateTime;getPayTime;getFinishTime;getExpShipTime;getAppointmentShipTime;getBuyerWords;getSellerRemarkStars;getSellerWords;getBTypeDesc;getOrderStatusDesc;getCancelReason;getOrderTypeDesc;getShipTime;getOrderAmount;getPostAmount;getPromotionAmount;getPromotionPlatformAmount;getPromotionShopAmount;getPromotionTalentAmount;getModifyPostAmount;getPromotionPayAmount;getPromotionTalentAmount;getPlatformCostAmount;getShopCostAmount;getAuthorCostAmount;getPostTel;getPostReceiver;getAuthorId;getAuthorName;getHasTaxDesc;getBizDesc;getCBizDesc;getAdEnvTypeDesc;getLatestReceiptTime";

        String[] ssss = sssss.split(";");


        FileReader fileReader = new FileReader("src\\main\\java\\com\\disdr\\detacenter\\dy_shop_order.txt");
        BufferedReader br = new BufferedReader(fileReader);
        String line = br.readLine();
        List<String> list = new ArrayList<>(100);
        for(;line!=null;line = br.readLine()){
            if(line!=null && line.indexOf("private")>0 && !line.startsWith("//")){
                list.add(line);
            }
        }

        List<String> lll = new ArrayList<>(40);
        for(int i =0;i<46;i++){
            lll.add(null);
        }
        for(int i = 0 ; i<ssss.length ;i++){
            for (String sss : list){
                String ss= ssss[i];
                if(ss.startsWith("get")){
                    ss = " " + ss.substring(3,4).toLowerCase()+ ss.substring(4)+";";
                }
                if(sss.indexOf(ss)>0){
                    lll.add(i,sss);
                }
            }
        }
        for(String str : lll){
            System.out.println(str);
        }
        for(String str : lll){
            String[] ttt =  str.split(" ");
            String tt = ttt[ttt.length-1];
            System.out.println(驼峰式命名法.unCamelCase(tt));
        }

    }


    public static void main2(String[] args) {
        String str ="getOrderNum";
        String ss = str.substring(4);
        System.out.println(str.substring(3,4));
        System.out.println(str.substring(3,4).toLowerCase());
        System.out.println(ss);
    }
}


